package org.ikun.security_demo.model;

public class ResBean {
    private Integer status;
    private String msg;
    private Object data;


    public static ResBean ok(String msg,Object data){
        return new ResBean(200,msg,data);
    }
    public static ResBean ok(String msg){
        return new ResBean(200,msg,null);
    }

    public static ResBean error(String msg,Object data){
        return new ResBean(204,msg,data);
    }
    public static ResBean error(String msg){
        return new ResBean(204,msg,null);
    }
    private ResBean(){

    }

    private ResBean(Integer status, String msg, Object data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
